DatabaseTargetTests - Add coverage for DbConnectionFactory constructor#67
Conversation
|
Thank you for the contribution. Since there already multiple tests that verifies that
I think these tests are already covered by existing test:
|
|
The 7 tests cover the The 4 you want to keep cover defensive cases (null factory, factory-returns-null, factory-throws) and parameters-write. The 3 you want to drop (Simple, Batched, KeepConnection) give the factory constructor parity with the write-mode coverage the existing tests provide for the connection-string constructor. Architecturally both constructors set |
|
I don't see a need to future proof the unit-tests to handle any possible combination of code-changes in the future. Hopefully any future changes to the code will include their own unit-tests. The goal for me is to verify that input-delegate is called when opening database-connection. |
|
Agreed. Narrowing to the 4 you listed. Will drop the other 3 and push an update shortly. |
98ab414 to
70dea6c
Compare
|
Closing and opening pull-request to tickle the build-server |
|
Thank you for the nice contribution, and making the last adjustments. Much appreciated. |
Introduces test coverage for the
DatabaseTarget(Func<IDbConnection>)constructor. Previously covered indirectly through existing tests, this brings parity with legacyDBProviderconstructor tests. Four new test cases added covering null factories, null returns, exceptions, and parameterized writes. All 219 tests pass on net8.0 with no production code modifications.